package com.river.boot.security.authentication;

import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * 短信验证码认证令牌
 */
public class SmsAuthenticationToken extends AbstractAuthenticationToken {

    /**
     * 认证信息(手机号)
     */
    private final Object principal;

    /**
     * 认证凭证(验证码)
     */
    private final Object credentials;

    public SmsAuthenticationToken(Collection<? extends GrantedAuthority> authorities, Object principal, Object credentials) {
        super(authorities);
        this.principal = principal;
        this.credentials = credentials;
    }



    @Override
    public Object getCredentials() {
        return null;
    }

    @Override
    public Object getPrincipal() {
        return null;
    }
}
